home *** CD-ROM | disk | FTP | other *** search
/ PC Home 48 / Fun Clicp Art 5000.iso / r / mbm / 00808_SU-mol co.ls < prev    next >
Encoding:
Text File  |  1996-05-11  |  1.6 KB  |  55 lines

  1. on molette monPas
  2.   global g1erSprLoc, gBoutons, gMol, gScopeCo0, gScopeCo1, gPosVideo, gPosDebP, gPosDebS0, gPosDebS1, gPosDebE
  3.   if monPas <> 0 then
  4.     set gMol to gMol + integer((monPas / 8) + 1)
  5.     if gMol < 0 then
  6.       set gMol to 9
  7.     end if
  8.     if gMol > 9 then
  9.       set gMol to 0
  10.     end if
  11.     set gPosVideo to gPosVideo + (monPas mod 240)
  12.     set gPosVideo to gPosVideo - (gPosVideo mod 2)
  13.     if gPosVideo > 239 then
  14.       set gPosVideo to gPosVideo - 239
  15.     else
  16.       if gPosVideo < 0 then
  17.         set gPosVideo to 239 + gPosVideo
  18.       end if
  19.     end if
  20.     gBoutons(habille, g1erSprLoc + 14, "BTGMOL " & gMol)
  21.     gScopeCo0(SetTime, gPosDebE + gPosDebS0 + gPosDebP + gPosVideo)
  22.     gScopeCo1(SetTime, gPosDebE + gPosDebS1 + gPosDebP + gPosVideo)
  23.     go(the frame)
  24.   end if
  25. end
  26.  
  27. on mouseDown
  28.   global gBoutons, g1erSprLoc, gNumSpr, gTraduit, gScopeCo0, gScopeCo1, gPosVideo, gPosDebP, gPosDebS0, gPosDebS1, gPosDebE
  29.   curseur(9)
  30.   set gNumSpr to g1erSprLoc + 12
  31.   set monLocV to the mouseV
  32.   set firstLocH to the mouseH
  33.   set precLocH to firstLocH
  34.   set the text of cast "ZI5" to getAt(gTraduit, 52)
  35.   set gPosVideo to gScopeCo0(GetTime) - gPosDebE - gPosDebS0 - gPosDebP
  36.   repeat while the stillDown = 1
  37.     set monLocH to the mouseH
  38.     set diff to precLocH - monLocH
  39.     if abs(diff) > 3 then
  40.       molette(precLocH - monLocH)
  41.       set precLocH to monLocH
  42.     end if
  43.   end repeat
  44.   set gPosVideo to gScopeCo0(GetTime) - gPosDebE - gPosDebS0 - gPosDebP
  45. end
  46.  
  47. on mouseUp
  48.   global gSurvolPrec, g1erSprLoc
  49.   if the visible of sprite (g1erSprLoc + 14) = 1 then
  50.     set gSurvolPrec to -1
  51.   else
  52.     pass()
  53.   end if
  54. end
  55.